<layout name='layout_page' />

<div class="row">
	<div class="col-lg-12">
		<div class="row">
			<div class="col-lg-12">
				<ol class="breadcrumb">
					<li><a href="<{:U('Index/index')}>">Home</a></li>
					<li class="active"><span>Chat</span></li>
				</ol>
				<h1>Chat</h1>
			</div>
		</div>

		<div class="row">
			<div class="col-lg-12">
				<div class="main-box clearfix">
					<form id="ajaxForm" action="<{:U('Message/alldel',array('type'=>'inbox'))}>" method="post" class="form-horizontal form-validata">
					<div class="main-box-body clearfix">
						<div class="table-responsive clearfix">
							<table class="table user-list table-hover">
								<thead>
									<tr>
										<th width="150">From</th>
										<th class="text-center" width="130"><span>Latest time</span></th>
										<th class="text-center" width="100">Status</th>
										<th class="text-center" width="130">Action</th>
									</tr>
								</thead>
								<tbody>
									<?php if($list){ ?>
									<volist name="list" id="vo">
									<tr>
										<?php if($vo['type']==1){ ?>
										<td><img src="<{$vo.fromFace|getFace}>" style="width: 50px;height: 50px;" alt=""><a href="javascript:;" class="user-link"><{$vo.fromName}></a><span class="user-subhead">Mentees</span></td>
										<?php }else{ ?>
										<td><img src="<{$vo.fromFace|getFace}>" style="width: 50px;height: 50px;" alt=""><a href="javascript:;" class="user-link"><{$vo.fromName}></a><span class="user-subhead">Mentors</span></td>
										<?php } ?>
										<td class="text-center"><{$vo.createTime|date="F,d,Y H:i:s",###}></td>
										<td class="text-center"><?php if($vo['total']>0){ ?><span class="label label-danger">News</span><?php }else{ ?><span class="label label-default">Readed</span><?php } ?></td>
										
										<td class="text-center">
										<a href="javascript:;" onclick="openWindow('Instant Chat','<{:U('Message/chat',array('toID'=>$vo['fromID']))}>',650,550)" class="btn btn-success"><i class="fa fa-comment-o"></i> Chat</a>
										<a href="<{:U('Chat/view',array('formID'=>$vo['fromID']))}>"  class="btn btn-success"><i class="fa fa-eye"></i> View</a>

										</td>
									</tr>
									</volist>
									<?php }else{ ?>
									<tr><td><div class="empty">No new information</div></td></tr>
									<?php } ?>									
								</tbody>
							</table>
						</div>
					</div>
					</form>
				</div>
			</div>
		</div>


	

		<div class="row">
			<div class="col-md-12">
				<div class="page">
					<nav>
	  					<ul class="pagination"><{$page}></ul>
	  				</nav>
	  			</div>
			</div>
		</div>	
	</div>
</div>